<?php
  
  //$table = "[php_property:table]";
  
  
  /*$formHtml = file::readTextFile(config::$projectPath."/scaffolding/form.html", false);
  $formHtml = dom::setAttribute("form", "com", "save_form", $formHtml);
  $formHtml = dom::setAttribute("form", "table", "[php_property:table]", $formHtml);
  
  
  $formContent = "";
  $field = general::stringToArray($item->field);
 
  
  
  foreach ($field as $fieldItem) {
      
      $itemHtml = file::readTextFile(config::$projectPath."/scaffolding/text_input.html", false);
      $itemHtml = dom::setAttribute("input", "name", $fieldItem, $itemHtml);
      $itemHtml = dom::setAttribute("input", "id", $fieldItem, $itemHtml);
      
      $formContent = $formContent.$itemHtml;
  }*/
  
  
  
  /*$backendScaffolding = new scaffolding_administration();
  $backendScaffolding->xmlFilename = config::$projectPath . "/db/db.xml";
  $backendScaffolding->baseDir = false;
  
  
  $formHtml = $backendScaffolding->createForm($table);
  
  //$backendScaffolding->createBackend($this->tableName);  */
  
  //$formHtml = str_ireplace("[content]", $formContent, $formHtml);
  
  
  $scaffoldingForm = new scaffolding();
  $scaffoldingForm->tableName = "[php_property:table]";        
  $scaffoldingForm->tableUrl = "[php_property:redirect]";
  //$scaffoldingForm->formTitle = "[php_property:form_title]";
  $formHtml = $scaffoldingForm->createForm();
  
  
  $item->innertext=$formHtml;
  
?>
